package com.tongtong.middleware.blockchain.entity;

import java.io.Serial;
import java.io.Serializable;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;

import lombok.Data;
import lombok.experimental.Accessors;

/**
 * @author wangqi
 */
@Data
@Accessors(chain = true)
@TableName("tbl_middleware_log")
public class TblMiddlewareLog implements Serializable {
	@Serial
	private static final long serialVersionUID = 1L;
	@TableId(value = "id", type = IdType.AUTO)
	private long id;
	private String provider;
	private String method;
	private String userId;
	private String assetId;
	private String originalRequestInfo;
	private String requestInfo;
	private String responseInfo;
	private String responseErrorInfo;
	private String responseJobId;
	private String responseAsyncInfo;

	public TblMiddlewareLog(String provider, String method, String requestInfo, String responseInfo, String responseErrorInfo, String responseJobId,
			String responseAsyncInfo) {
		this.provider = provider;
		this.method = method;
		this.requestInfo = requestInfo;
		this.responseInfo = responseInfo;
		this.responseErrorInfo = responseErrorInfo;
		this.responseJobId = responseJobId;
		this.responseAsyncInfo = responseAsyncInfo;
	}

	public TblMiddlewareLog(String provider, String method, String userId, String assetId, String originalRequestInfo, String requestInfo, String responseInfo,
			String responseErrorInfo, String responseJobId, String responseAsyncInfo) {
		this.provider = provider;
		this.method = method;
		this.userId = userId;
		this.assetId = assetId;
		this.originalRequestInfo = originalRequestInfo;
		this.requestInfo = requestInfo;
		this.responseInfo = responseInfo;
		this.responseErrorInfo = responseErrorInfo;
		this.responseJobId = responseJobId;
		this.responseAsyncInfo = responseAsyncInfo;
	}
}
